﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditDataElement.aspx.cs" Inherits="BEELab.EditDataElement" %>



<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" href='./Content/css/style.css' />
    <link rel="stylesheet" type="text/css" href='./Content/css/source/jquery.fancybox.css' media="screen" />
    <script src='<%: ResolveClientUrl("~/Scripts/jquery-1.10.2.min.js")%>'></script>
    <script src='<%: ResolveClientUrl("~/Content/css/source/jquery.fancybox.js?v=2.1.5")%>'></script>
</head>
<body style="width: 640px; padding: 24px; background-color:#ffffff">
    <asp:literal id="literal1" runat="server"></asp:literal>
    <form id="form1" runat="server">
    <div id="Div1" class="clearfix">
        <asp:Label ID="lblEdit" runat="server">
            <h2 class="headline">Edit Data Element</h2>
        </asp:Label>
        <div id="new-data">
                            
        <div class="sign-form">
            <div class="input-hold">

                <asp:Label ID="Label10" CssClass="sign-label" AssociatedControlID="txtLabel" runat="server">Label</asp:Label>
                <asp:TextBox CssClass="sign-input" ID="txtLabel" runat="server" Width="200px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvtxtLabel" ForeColor="Red" Text="*" ValidationGroup="VariableGroup" ControlToValidate="txtLabel" runat="server" ErrorMessage="* Label is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ValidationExpression=".*" EnableClientScript="True" ID="RegexDataLabel" ForeColor="Red" ValidationGroup="VariableGroup" ControlToValidate="txtLabel" runat="server" ErrorMessage="* Label already in use"></asp:RegularExpressionValidator>
            </div>

            <div class="input-hold">

                <asp:Label ID="Label11" CssClass="sign-label" runat="server" AssociatedControlID="ddlVariable" Text="Variable"></asp:Label>

                <asp:DropDownList CssClass="sign-select" ID="ddlVariable" runat="server" DataSourceID="SqlDataSource5" DataTextField="Name" DataValueField="ID">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource5" ConnectionString="<%$ ConnectionStrings:beelabConnectionString %>" SelectCommand="SELECT ID, Name FROM Variables WHERE ProgramID=(SELECT ProgramID FROM Stages WHERE ID=(SELECT StageID FROM DataElements WHERE ID=@ID))" runat="server">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>

                <asp:RequiredFieldValidator ID="rfvddlVariable" ControlToValidate="ddlVariable" InitialValue="Choose" ForeColor="Red" ValidationGroup="VariableGroup" runat="server" ErrorMessage="* Variable is required" Text="*"></asp:RequiredFieldValidator>
            </div>
            <div class="input-hold">
                <asp:Button CssClass="sign-submit" ID="Button3" Text="Submit" ValidationGroup="VariableGroup" runat="server" OnClick="Button3_Click" />
            </div>
        </div>
        <div class="error">
            <asp:ValidationSummary ID="ValidationSummary2" runat="server" ValidationGroup="VariableGroup" />
            <p>&nbsp</p>
        </div>
        <script type="text/javascript">

            $(document).ready(function () {

                $("a[class='logicbtn fancybox']").fancybox();
                $("a[class='abbtn fancybox']").fancybox();

            });
        </script>

    </div>
    </div>
    </form>
</body>
</html>
